
#pragma once

#include "SideUserObject.h"
#include "CFDDataPack.h"
#include "MultiVariableInterface.h"

#include "Eigen/Dense"

class CFDProblem;

using Eigen::Vector3d;
using std::vector;

class CFDForceUserObject :
public SideUserObject,
public MultiVariableInterface
{
public:
	CFDForceUserObject(const InputParameters &parameters);

	virtual void initialize();
	virtual void execute();
	virtual void threadJoin(const UserObject & uo);
	virtual void finalize();

	Vector3d _form_force;
	Vector3d _friction_force;
	Vector3d _total_force;
	Vector3d _total_momentum;

protected:
	void reinit();

	CFDProblem &_cfd_problem;
	CFDDataPack _cfd_data;
	int _qp;
	Real _ref_area;
	Vector3d _ref_point;

	bool _momentum;
	bool _force;

};


template<>
InputParameters validParams<CFDForceUserObject>();
